<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/10/19 0019
  Time: 19:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link href="../dist/css/bootstrap.css" rel="stylesheet">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link href="../dist/css/bootstrap-theme.css" rel="stylesheet">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="../dist/js/bootstrap.js"></script>
    <link rel="stylesheet" href="../css/pay.css">


</head>
<body>
<div class="all-context">
    <div class="pay-header">
        <img src="../images/logo.png">
        <span class="pay-header-span1">.</span>
        <span class="pay-header-span2">收银台</span>
    </div>
    <div class="pay-body-1">
        <div class="pay-body-1-1">
            <h3>市中心/近春熙路/舒适家庭双卧大套二</h3>
            <p>9月27日-9月28日 共1晚</p>
            <span class="pay-time">
            </span>

        </div>
    </div>
    <div class="pay-body-2">
        <div class="pay-money">
            <span class="pay-money-p">待支付金额:</span>
            <span class="pay-money-h">￥</span>

            <span class="pay-money-num">${price}</span>
            <span class="ddh">
                <span style="color: #0C0C0C;">商品id:</span>
                <span class="spid">${id}</span></span>


        </div>
        <div class="pay-kinds">
            <span>支付方式</span>
            <ul>
                <li>
                    <input type="radio" name="pauKind" value="weChat" checked>
                    <div class="pay-kinds-img"><img src="../images/wechat.png"></div>
                    <div>微信支付</div>
                    <div>微信安全支付</div>
                </li>

                <li>
                    <input type="radio" name="pauKind" value="payB">
                    <div class="pay-kinds-img"><img src="../images/payb.png"></div>
                    <div>支付宝支付</div>
                    <div>安全支付,推荐使用</div>
                </li>
            </ul>
        </div>

        <a href="javascript:void(0)" class="a1"><button class="pay-btn">确认支付</button></a>



    </div>
</div>


<script>

    window.onload=function(){
        var countdown=document.querySelector(".pay-time");

        var time=1800;//30分钟换算成1800秒


        setInterval(function(){
            time=time-1;
            var minute=parseInt(time/60);
            var second=parseInt(time%60);
            countdown.innerHTML='支付剩余时间:'+minute+'分'+second+'秒';


        },1000);
    }

</script>

<script>
    document.querySelector(".a1").onclick = function () {
        var dingdan = document.querySelector(".spid").innerHTML;
        var jinge = document.querySelector(".pay-money-num").innerHTML;
        document.querySelector(".a1").href = "http://localhost:8080/index/Pay?dingdan="+dingdan+"&jinge="+jinge;

    };
</script>



</body>
</html>
